import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    redirect: '/home'
  },
  {
    path: '/home',
    name: 'Home',
    component: ()=>import ('@/views/home/Home.vue')
  },
  {
    path: '/trade',
    name: 'Trade',
    component: () => import('@/views/trade/Trade.vue')
  }, {
    path: '/asset',
    name: 'Asset',
    component: () => import('@/views/asset/Asset.vue')
  }, {
    path: '/profile',
    name: 'Profile',
    component: () => import('@/views/profile/Profile.vue')
  }, {
    path: '/hold',
    name: 'Hold',
    component: () => import('@/views/hold/Hold.vue')
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})


router.beforeEach((to, from, next) => {
  next()
  
})

export default router
